<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:ser="http://schemas.microsoft.com/2003/10/Serialization/" xmlns:tns="http://schemas.datacontract.org/2004/07/MiniStock.Entities.Stock.Events.Order" elementFormDefault="qualified" targetNamespace="http://schemas.datacontract.org/2004/07/MiniStock.Entities.Stock.Events.Order" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:import schemaLocation="http://localhost:999/command?xsd=xsd1" namespace="http://schemas.microsoft.com/2003/10/Serialization/" />
  <xs:import schemaLocation="http://localhost:999/command?xsd=xsd2" namespace="http://schemas.datacontract.org/2004/07/MiniStock.Entities.Common.Events" />
  <xs:complexType name="OrderEventBase">
    <xs:complexContent mixed="false">
      <xs:extension xmlns:q1="http://schemas.datacontract.org/2004/07/MiniStock.Entities.Common.Events" base="q1:EntityEventBase">
        <xs:sequence>
          <xs:element minOccurs="0" name="Id" type="ser:guid" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="OrderEventBase" nillable="true" type="tns:OrderEventBase" />
  <xs:complexType name="ChangeOrderAmountEvent">
    <xs:complexContent mixed="false">
      <xs:extension base="tns:OrderEventBase">
        <xs:sequence>
          <xs:element minOccurs="0" name="Amount" type="xs:decimal" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="ChangeOrderAmountEvent" nillable="true" type="tns:ChangeOrderAmountEvent" />
  <xs:complexType name="ChangeOrderDeadlineEvent">
    <xs:complexContent mixed="false">
      <xs:extension base="tns:OrderEventBase">
        <xs:sequence>
          <xs:element minOccurs="0" name="Deadline" nillable="true" type="xs:dateTime" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="ChangeOrderDeadlineEvent" nillable="true" type="tns:ChangeOrderDeadlineEvent" />
  <xs:complexType name="SetOrderShippedEvent">
    <xs:complexContent mixed="false">
      <xs:extension base="tns:OrderEventBase">
        <xs:sequence>
          <xs:element minOccurs="0" name="ShippedDate" nillable="true" type="xs:dateTime" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="SetOrderShippedEvent" nillable="true" type="tns:SetOrderShippedEvent" />
  <xs:complexType name="ChangeOrderProductEvent">
    <xs:complexContent mixed="false">
      <xs:extension base="tns:OrderEventBase">
        <xs:sequence>
          <xs:element minOccurs="0" name="ProductId" type="ser:guid" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="ChangeOrderProductEvent" nillable="true" type="tns:ChangeOrderProductEvent" />
  <xs:complexType name="CreateOrderEvent">
    <xs:complexContent mixed="false">
      <xs:extension base="tns:OrderEventBase">
        <xs:sequence>
          <xs:element minOccurs="0" name="Amount" type="xs:decimal" />
          <xs:element minOccurs="0" name="CustomerId" type="ser:guid" />
          <xs:element minOccurs="0" name="Deadline" nillable="true" type="xs:dateTime" />
          <xs:element minOccurs="0" name="ProductId" type="ser:guid" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="CreateOrderEvent" nillable="true" type="tns:CreateOrderEvent" />
</xs:schema>